﻿
using System;
namespace UpwardsTimeClock.Prototype
{
    public interface ISpanningControl
    {
        void Stop();
        void Start();
        void AdjustStartTime(TimeSpan adjustment);
    }

    public partial class SpanningControlBase<T> : StartableControlBase<T>, ISpanningControl where T:Spanning
    {
        public SpanningControlBase(T config): base(config)
        {
        }

        public virtual void Stop()
        {
        }

        public virtual void Timer()
        {
        }

        public virtual void AdjustStartTime(TimeSpan adjustment)
        {
        }

        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
            if (disposing) Stop();
        }
    }
}
